-
Notifications
You must be signed in to change notification settings - Fork 120
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update api.md #287
base: master
Are you sure you want to change the base?
Update api.md #287
Conversation
correct the default filter
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for fixing the wrong method call in the documentation. That's much appreciated! 👍
Unfortunately, the other suggested change is wrong (see detail comment). If you can remove that I'll merge the PR.
``` | ||
|
||
The filter can be either a string containing JSLT. The JSLT expression | ||
needs to return `true` for the object values that should be included. | ||
So to get the default behaviour you would set the filter to: | ||
|
||
``` | ||
. == null or . == {} or . == [] | ||
. == null or . == {} or . == [] or not(.) == false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This addition is not correct. As you can see here it really is null
, {}
, and []
that are the omitted values.
The suggested change would, for example, filter out true
, and 5
, and so on.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that's true, but the example expression says how to reproduce the default behaviour, which is your number 1.
correct the default filter